package com.cct.digitalarchapi.dao;


import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cct.digitalarchapi.pojo.ArchCategory;
import com.cct.digitalarchapi.pojo.vo.ArchDeptWithCateVo;
import com.cct.digitalarchapi.pojo.vo.ArchMainCountVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface ArchCategoryMapper extends BaseMapper<ArchCategory> {
    IPage<ArchCategory> getAllCategory(IPage<ArchCategory> page ,@Param("type") int type);

    void addCategory(ArchCategory archCategory);

    ArchCategory selectLastCategory();

    void deleteCategory(@Param("archCateId") int archCateId);

    void updateCategory(ArchCategory archCategory);

    int queryHaveSameName(@Param("archCateName") String archCateName);

    List<ArchMainCountVo> getCategory();

    List<ArchDeptWithCateVo> getAllCate();

    String getCateCodeByName(@Param("archCateName") String archCateName);

}
